(function(){
    var value = $("#scountproductId").attr("value");

    $.ajax({
        type: "GET",
        url: "http://193.112.55.79:9090/api/getdiscountproduct",
        data: {
            productid: value
        },
        dataType: "json",
        success: function (res) {
            console.log(res);
            var html = template("scountproduct-detail",res);
            $(".product-main").html(html);
        }
    });

    $(".internal-back").on("click",function(){
        document.body.scrollTop = document.documentElement.scrollTop = 0;
    });
})()
